using System;
using System.Collections;
using System.Collections.Generic;
using TGame.UI;
using UnityEngine;
using UnityEngine.SceneManagement;

namespace Koakuma.Game.UI
{
    public class TreasureUIMediator : UIMediator<TreasureView>
    {
        protected override void OnHide()
        {
            base.OnHide();
        }

        protected override void OnInit(TreasureView view)
        {
            base.OnInit(view);
        }

        protected override void OnShow(object arg)
        {
            base.OnShow(arg);
            view.btn_close.onClick.AddListener(awfawfaw);
            view.btnEnterTreasure.onClick.AddListener(OnClickEnterTreasure);
        }

        private void OnClickEnterTreasure()
        {
            SceneManager.LoadScene("XinScene");
           // GameManager.Message.Post(new MessageType.EnterDungeon()).Coroutine();
        }
        
        private void awfawfaw()
        {
            GameManager.UI.CloseUI(UIViewID.Treasure);
        }
    }
}

